package com.team.cluedo.app.waitscreens;

import android.app.Activity;
import android.content.pm.ActivityInfo;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.TextView;

import com.team.cluedo.Game;
import com.team.cluedo.R;
import com.team.cluedo.app.utils.CluedoMenu;

public class WaitForYourTurn extends Activity{

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		super.onCreateOptionsMenu(menu);
		boolean res = CluedoMenu.onCreateOptionsMenu(menu, this);
		return res;
	}
	
	@Override
	public boolean onOptionsItemSelected(MenuItem item) {
		return CluedoMenu.onOptionsItemSelected(item, this);
	}
	
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
		setContentView(R.layout.waitforyourturn);
		
		
		TextView tx = new TextView(this);
		tx = (TextView) findViewById(R.id.TextView01);
		if (Game.cluedo.nomJoueurCourant.equalsIgnoreCase("")){
			tx.setText("En attente");
		}
		else {
			tx.setText("C'est au tour de "+Game.cluedo.nomJoueurCourant);
		}
	}
}
